#!/usr/bin/python3

import re

passwd = input("please input your need password:")
def check_password(passwd):
    if re.match(r'^(?=.*[A-Za-z])(?=.*[0-9])\w{6,}$',passwd):
        print ("password %s correct"%passwd)
        return True
    else:
        print ("password %s is invalid"%passwd)
        return False
